package com.design.interpreter.demo2;

public class InterpreterPatternDemo {
    public static void main(String[] args) {
        Expression expression = new AddExpression(
            new NumberExpression(10),
            new SubtractExpression(
                new NumberExpression(5),
                new NumberExpression(2)
            )
        );

        int result = expression.interpret();
        System.out.println("Result: " + result); // Output: 7
    }
}
